package edu.bw.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/product")//实现访问路径窄化
public class ProductController {

    /** @RequestMapping  path属性(value):可以绑定多个请求路径
     *
     * @return
     */
//    @RequestMapping({"/list.do","product/list.do"})

//    @RequestMapping(method = RequestMethod.POST,path = "/list.do")

//    @PostMapping("/list.do")//等效上面的写法
    @GetMapping("/list.do")
    public ModelAndView list(){
        return new ModelAndView("productList");
    }



}
